package com.cn.qgx428.lazydiary.Utils

import android.text.TextUtils
import java.io.File

/**
 * Created by qinguanxiong on 2018/3/10.
 */
object FileUtil {
    fun getFileName(filePath: String): String{
        if (TextUtils.isEmpty(filePath))
            return ""
        val file = File(filePath)
        val name = file.name
        val index = name.indexOf('.')
        return name.substring(0,index)
    }
}